package com.dom.domweb.utils;

import com.dom.common.model.standard.ModelHead;
import com.dom.domweb.modular.shiro.model.ShiroUser;
import com.dom.domweb.modular.shiro.util.ShiroUtil;

/**
 * @Description 交易工具类
 * @Author xllei
 * @Date 2018/12/9 3:19 AM
 * @Version 1.0
 **/
public class TradeUtil {
    private static boolean setHead(ModelHead modelHead, ShiroUser user){
        modelHead.setOperId(user.getId());
        modelHead.setMemCode(user.getMemCode());
        modelHead.setOrgId(user.getOrganCode());
        modelHead.setSendId("web");
        return true;
    }

    public static boolean setHead(ModelHead modelHead){
        ShiroUser user = ShiroUtil.getUser();

        return setHead(modelHead, user);
    }
}
